1. Field of the Invention
The present invention relates to a method and apparatus for encoding moving pictures. In particular, the present invention relates to a method and apparatus for performing variable bit rate control in a digital video encoder while maintaining a particular overall bit-rate.
2. Description of the Related Art
One of the main obstacles faced by industry dealing with digital video processing, storage and transmission is the large amount of data needed to represent analog video in the digital domain. Accordingly, digital compression is often applied to moving pictures to achieve a reduction in required transmission bandwidth or storage size. One variety of such compression techniques can be derived from the ISO/IEC MPEG Standards, the ISO/IEC 11172-3(MPEG-1), the ISO/IEC 13818-2 (MPEG-2) and the MPEG-2 TM5 (test model 5), developed by the Moving Picture Experts Group of the International Organization for Standardization. The disclosures of those standards documents are hereby expressly incorporated into this specification by reference. MPEG-1 is the compression standard used in Video CD while MPEG-2 is the video compression standard used in DVD and many digital broadcasting systems.
The MPEG standards specify only the syntax of the compressed bit streams and method of decoding. The method of implementation in the encoder is left to the developer, and any form of encoder may be employed as long as the resulting bit stream conforms with the specified syntax.
In certain applications such as video storage device (recorder), it is possible to use variable bit rate (VBR) encoding. A VBR encoder is able to vary its output bit-rate over a larger range than a CBR encoder, and this would generate an output which has a more constant visual quality. An example of a VBR encoder is described in U.S. Pat. No. 5,650,860, entitled “Adaptive Quantization”. In order to maintain a maximum bit rate allowed by the target storage device as well as an overall bit-rate which enables input picture sequence to be stored into a defined storage space, such VBR encoders utilize multiple encoding passes.
In the first encoding pass, the bit utilization information is determined for each scene or each picture in the input sequence. This may be done by fixing the reference quantization step size and disabling the VBV control. The determined bit utilization information is then used to generate a bit budget for each scene or picture such that an overall target number of bits to code the sequence is fixed, and that the maximum bit rate is not violated. In cases that bit utilization information obtained is not close to that required for generating the bit budget, steps from the first coding pass must be repeated with an adjusted reference quantization step-size. The input sequence is coded in a final pass using the generated bit budget information to achieve the target bits or overall bit rate.
Multiple-pass VBR encoders requires large storage memory for intermediate bit utilization information, and large computation needs for the additional passes and bit budget generation. Furthermore, such a VBR encoder cannot process input sequences in real-time as required by certain applications.